namespace CSharpPro;

public class Demo1
{
    public static double CalculateTravelPrice(int month, string transport)
    {
        double originalPrice = 8800;
        double discountRate = 0;

        if (month >= 5 && month <= 10)
        {
            discountRate = transport == "航班" ? 0.9 : 0.75;
        }
        else
        {
            discountRate = transport == "航班" ? 0.6 : 0.3;
        }

        return originalPrice * discountRate;
    }
}